//
// Created by nicemoe on 2021/8/7.
//

#include  <iostream>

using namespace std;

void temp(int &a, int &b)
{
    int tmp = a;
    a = b;
    b = tmp;
}

void temp2(int *a, int *b)
{
    int tmp = *a;
    *a = *b;
    *b = tmp;
}

int main()
{
    int m = 10, n = 23;
    temp(m, n);
    cout << m << "\t" << n << endl;
    temp2(&m, &n);
    cout << m << "\t" << n << endl;
    return 0;
}
